package com.bdqn.springbootmybatisplus.controller;

import com.bdqn.springbootmybatisplus.service.SysUserService;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

/**
 * LoginController
 *
 * @author
 * @since
 */
@Controller
public class LoginController {

    @Resource
    private SysUserService sysUserService;

    // @GetMapping("/main")
    // public String main() {
    //     return "main";
    // }

    // @PostMapping("/login")
    // public String login(HttpSession session, String usrName, String usrPassword) {
    //     System.out.println("/login ----------------------");
    //     QueryWrapper<SysUser> qw = new QueryWrapper<>();
    //     qw.eq("usr_name", usrName);
    //     SysUser sysUser = sysUserService.getOne(qw);
    //     if (sysUser != null) {
    //         System.out.println("登录成功！----------------------");
    //         session.setAttribute("loginUser", sysUser);
    //     }
    //     return "main";
    // }
}
